<?php
/**
 * Created by PhpStorm.
 * User: mf
 * Date: 2017/9/9
 * Time: 19:40
 */
namespace app\admin\validate;

class Type extends Base
{
    //添加分类
    public static function addType()
    {
        return [
            'rule' => [
                'parentID' => 'require',
                'name' => 'require|chsDash'
            ],
            'msg' => [
                'parentID.require' => '一级分类不能为空',
                'name.require' => '分类名称不能为空',
                'name.chsDash' => '分类名称只能是汉字、字母、数字和下划线_及破折号-'
            ]
        ];
    }
}